package vsy.buzzwordbingo.model.impl;

import java.util.List;

import vsy.buzzwordbingo.model.Game;
import vsy.buzzwordbingo.model.GameBoard;
import vsy.buzzwordbingo.model.Player;

public class GameBuilder {
	private String id;
	private String title;
	private int size;
	private String description;
	private Player owner;
	private List<String> buzzwords;

	
	private Player winner;
	
	private long creationTime;
	private long lastModificationTime;
	
	public void setId(String id) {
		this.id = id;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public void setSize(int size) {
		this.size = size;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public void setOwner(PlayerBuilder owner) {
		if (owner != null) {
		this.owner = owner.createPlayer();
		}
	}
	public void setBuzzwords(List<String> buzzwords) {
		this.buzzwords = buzzwords;
	}
	public void setWinner(PlayerBuilder winner) {
		if (winner != null) {
		this.winner = winner.createPlayer();
		}
	}
	public void setCreationTime(long creationTime) {
		this.creationTime = creationTime;
	}
	public long getCreationTime() {
		return creationTime;
	}
	public void setLastModificationTime(long lastModificationTime) {
		this.lastModificationTime = lastModificationTime;
	}
	public long getLastModificationTime() {
		return lastModificationTime;
	} 
	public Game createGame() {
		return new GameImpl( id,  title,  size,  description,  owner, buzzwords, winner, creationTime,  lastModificationTime );
	}
}
